package com.example.sender;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SenderApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(SenderApplication.class, args);
        Sender sender = (Sender) context.getBean("sender");

        for (int i = 0; i < 10; i++) {
            sender.sendMessage("hello springboot activemq " + i);
        }
    }

}
